package com.quanyan.club.exception;

import com.quanyan.common.enums.BaseEnum;

/**
 * Created by zhuo.shi on 2016/6/1.
 */
public enum ClubEnum implements BaseEnum {

    CLUB_NAME_ALERT_ERROR(1, "1001", "俱乐部名称只能被修改一次", false),
    CLUB_MEMBER_EXIST(2, "10002", "已经加入了此俱乐部", false),
    CLUB_MEMBER_NOT_EXIST(3, "10003", "不是此俱乐部成员", false),
    CLUB_ACCOUNT_IS_BINDING(4, "10004", "此账号已经绑定！", false),
    CLUB_ACCOUNT_NOT_BIND(5, "10005", "此账号还没有绑定到俱乐部", false),
    CLUB_WITHDRAW_APPLY_COUNT_LIMIT(6, "10006", "每天提现次数不能超过3次", false),
    CLUB_WIDTHRAW_MAXAMOUNT_ALIPAY(7, "10007", "支付宝每笔提现金额不能超过5万！", false),
    CLUB_WIDTHRAW_MAXAMOUNT_WEIXIN(8, "10008", "支付宝每笔提现金额不能超过2万！", false),
    CLUB_WIDTHRAW_NO_FUND(9, "10009", "可用余额不足！", false);

    private Integer id;
    private String code;
    private String label;
    private boolean success;

    ClubEnum(int id, String code, String label, boolean success){
        this.id = id;
        this.code = code;
        this.label = label;
    }

    @Override
    public boolean isSuccess() {
        return this.success;
    }

    @Override
    public int getId() {
        return this.id;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getLabel() {
        return this.label;
    }
}
